<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
            <title>Title</title>
    </h:head>
    <h:body>
        <ui:composition template="./templates/main.xhtml">
            <ui:define name="css">
                <link type="text/css" rel="stylesheet" href="./resources/css/pages/login.css"></link>
            </ui:define>
            <ui:define name="row-content">
                <div class="center_content">
                    <div class="page-header">
                            <h1>Вход в систему управления</h1>
                    </div>
                    <h:form>
                            <div class="error-item">
                                    <h:outputText value="Пользователь с такой парой логин-пароль не найден в системе" rendered="#{login.isError()}" />
                            </div>
                            <div class="_row">
                                    <div class="_cell _w50px">
                                            Логин
                                    </div>
                                    <div class="_cell">
                                            <input type="text" jsfc="h:inputText" value="#{login.login}" />
                                    </div>
                            </div>
                            <div class="_row">
                                    <div class="_cell _w50px">
                                            Пароль
                                    </div>
                                    <div class="_cell">
                                            <input type="password" jsfc="h:inputSecret" value="#{login.password}" />
                                    </div>
                            </div>
                            <input class="_w100px btn btn-primary" type="submit" jsfc="h:commandButton" value="Войти" action="#{login.logon()}" />
                    </h:form>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>